package com.nth.rooster.core.entities;

import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

@Entity
@Table(name = "RAM_USER_CIRCLE_MEMBER")
public class RamUserCircleMember {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "CIRCLE_USER_ID")
	private Long circleUserID;
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CIRCLE_ID")
	private RamCircles circleID;
	
	@ManyToOne(cascade=CascadeType.ALL)
	@Cascade(value=org.hibernate.annotations.CascadeType.PERSIST)
	@JoinColumn(name="USER_ID")
	private RamUsers userID;

	@Column(name = "IS_APPROVED")
	private Boolean isApproved;

	@Column(name = "APPROVED_BY")
	private String approvedBy;

	@Column(name = "APPROVED_DATE")
	private Date approvedDate;

	public Long getCircleUserID() {
		return circleUserID;
	}

	public void setCircleUserID(Long circleUserID) {
		this.circleUserID = circleUserID;
	}

	public RamCircles getCircleID() {
		return circleID;
	}

	public void setCircleID(RamCircles circleID) {
		this.circleID = circleID;
	}

	public RamUsers getUserID() {
		return userID;
	}

	public void setUserID(RamUsers userID) {
		this.userID = userID;
	}

	public Boolean getIsApproved() {
		return isApproved;
	}

	public void setIsApproved(Boolean isApproved) {
		this.isApproved = isApproved;
	}

	public String getApprovedBy() {
		return approvedBy;
	}

	public void setApprovedBy(String approvedBy) {
		this.approvedBy = approvedBy;
	}

	public Date getApprovedDate() {
		return approvedDate;
	}

	public void setApprovedDate(Date approvedDate) {
		this.approvedDate = approvedDate;
	}

	
	
}
